package com.myapp.model.impl.sys;

import java.util.HashMap;
import java.util.Map;
import org.mybatis.spring.SqlSessionTemplate;
import com.myapp.model.dao.sys.AdminDao;
import com.myapp.model.entity.sys.Admin;

public class AdminDaoImpl implements AdminDao {

	private SqlSessionTemplate sqlDao;
	
	public void setSqlDao(SqlSessionTemplate sqlDao) {
		this.sqlDao = sqlDao;
	}

	@Override
	public Admin login(String id, String passwd) {
		Map<String,String> paramMap = new HashMap<String,String>();
		paramMap.put("name", id);
		paramMap.put(passwd, passwd);
		return (Admin)sqlDao.selectOne("sys.selectAdmin",paramMap);
	}
}
